<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"  isELIgnored="false"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib prefix="c"      uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt"    uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--@ 
taglib uri="http://www.opensymphony.com/oscache"  prefix="oscache"--%>
<%
	response.setDateHeader("Expires", 0);
	response.setHeader("Cache-Control", "no-cache");
	response.setHeader("Pragma", "no-cache");
%><%
	String prjpath = request.getContextPath();//项目根路径
	request.setAttribute("prjpath", prjpath);
	
%>
<script type="text/javascript">
	var prjpath = "${prjpath}";  // 应用程序的根路径 */
</script>
<%-- 通用的js与css --%>
<html>
  <head>
    <!-- 模板页面 -->
    
    <title>用户请假单集合页面</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
  </head>
  
  <body>
 ${userSession.user_name }
        <input type="button" name="flush" id="flush" value="返回"
     onclick="javascript:window.navigate('login.jsp');"/><br/>
  	请假单列表(my):
     <table border="1">
     	<tr>
     		<td>编号</td>
     		<td>原因</td>
     		<td>创建时间</td>
     		<td>天数</td>
     		<td>状态</td>
     		<td>相关操作</td>
     	</tr>
     	<c:forEach items="${list}" var="leave">	
     		<tr>
     		<td>${leave.leave_id }</td>
     		<td>${leave.content }</td>
     		<td>${leave.apply_time }
     		</td>
     		<td>${leave.totleday }</td>
     		<td>${leave.status }</td>
     		<td>
     			<c:if test="${leave.status == '新建'}">
     				<a href="activeManager.do?doMethod=deleteLeave&leave_id=${leave.leave_id }">删除</a>
     				<a href="activeManager.do?doMethod=applyLeaveAction&leave_id=${leave.leave_id }">申请</a>
     			</c:if>
     		</td>
     	</tr>
     	</c:forEach>
     </table>
     
     -------------------------------------------------------------------<br/>
     创建请假单：<br/>
     <form action="activeManager.do?doMethod=saveLeave" namespace="/leave" method="post" name="createLeave">
     	 请假原因：<textarea name="content" id="content"></textarea><br/>
  		  请假天数：<input type="text" name="day" id="day"/><br/>  
     	<input type="submit" value="创建"/>
     </form>
  </body>
</html>
